package com.acme.bankapp.domain.bank;

//TODO: define class body
public class SavingAccount extends AbstractAccount {


    public SavingAccount(double amount) {
        super(amount);
    }

    public void deposit(double amount) {
        if (amount > 0) {
            balance += amount;
        }
    }

    public void withdraw(double amount) {
        if (balance >= amount) {
            balance -= amount;
        }
    }

    public double maximumAmountToWithdraw() {
        return balance;
    }
}
